package com.msb.mall.product.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.redisson.config.SingleServerConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther: xixifeng
 * @Date: 2022/10/25 - 10 - 25 - 18:30
 * @Description: com.msb.mall.product.config
 * @version: 1.0
 */
@Configuration
public class MyRedissonConfig {

    @Bean
    public RedissonClient redissonClient() {

        Config config = new Config();

                 config.useSingleServer()
                .setAddress("redis://192.168.56.100:6379");
      RedissonClient redissonClient = Redisson.create(config);

        return redissonClient;
    }




}
